<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>关注收藏</title>
    <link rel="stylesheet" href="assets/css/amazeui.min.css">
    <link rel="stylesheet" href="assets/css/app.css">
    <link rel="stylesheet" href="css/vipList.css">
</head>

<body>
    <header>
        <img src="img/z-jiantou.png">
        <span>会员列表</span>
    </header>
    <div class="vipLists">
        <div class="vip_list">
            <div class="h45">
                <div class="list_left">
                    <img src="img/defalut_img.png" alt="用户头像">
                    <span class="marL15">会员名称</span>
                </div>
                <div class="list_right">
                    <a class="checkDetail" href="javascript:;"></a>
                    <p class="childUser" data="openChild1">
                        <i></i>
                        <span></span>
                    </p>
                </div>
            </div>
            <div class="openChild openChild1">
                <div class="h45 child_user">
                    <div class="child_left">
                        <img src="img/defalut_img.png" alt="用户头像">
                        <span class="marL15">二级名称</span>
                    </div>
                    <div class="child_right">
                        <a class="checkDetail" href="javascript:;"></a>
                    </div>
                </div>
                <div class="h45 child_user">
                    <div class="child_left">
                        <img src="img/defalut_img.png" alt="用户头像">
                        <span class="marL15">二级名称</span>
                    </div>
                    <div class="child_right">
                        <a class="checkDetail" href="javascript:;"></a>
                    </div>
                </div>
            </div>
        </div>
        <div class="vip_list">
            <div class="h45">
                <div class="list_left">
                    <img src="img/defalut_img.png" alt="用户头像">
                    <span class="marL15">会员名称</span>
                </div>
                <div class="list_right">
                    <a class="checkDetail" href="javascript:;"></a>
                    <p class="childUser" data="openChild2">
                        <i></i>
                        <span></span>
                    </p>
                </div>
            </div>
            <div class="openChild openChild2">
                <div class="h45 child_user">
                    <div class="child_left">
                        <img src="img/defalut_img.png" alt="用户头像">
                        <span class="marL15">二级名称</span>
                    </div>
                    <div class="child_right">
                        <a class="checkDetail" href="javascript:;"></a>
                    </div>
                </div>
                <div class="h45 child_user">
                    <div class="child_left">
                        <img src="img/defalut_img.png" alt="用户头像">
                        <span class="marL15">二级名称</span>
                    </div>
                    <div class="child_right">
                        <a class="checkDetail" href="javascript:;"></a>
                    </div>
                </div>
            </div>
        </div>
    </div>


    <script src="assets/js/jquery.min.js"></script>
    <script>
        $('.childUser').on('click', function () {
            $data = $(this).attr("data");
            // console.log($data);
            if ($('.' + $data).hasClass('active')) {
                $('.' + $data).removeClass('active');
                $(this).removeClass("active");
            } else {
                $('.' + $data).addClass('active');
                $(this).addClass("active");
            }
        })
    </script>
</body>

</html>